package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.FintechRentBillHeader;
import com.appkubes.mall.core.po.FintechRentBillHeaderExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface FintechRentBillHeaderMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_rent_bill_header
     *
     * @mbg.generated
     */
    @SelectProvider(type=FintechRentBillHeaderSqlProvider.class, method="countByExample")
    long countByExample(FintechRentBillHeaderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_rent_bill_header
     *
     * @mbg.generated
     */
    @DeleteProvider(type=FintechRentBillHeaderSqlProvider.class, method="deleteByExample")
    int deleteByExample(FintechRentBillHeaderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_rent_bill_header
     *
     * @mbg.generated
     */
    @Delete({
        "delete from fintech_rent_bill_header",
        "where bill_key = #{billKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String billKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_rent_bill_header
     *
     * @mbg.generated
     */
    @Insert({
        "insert into fintech_rent_bill_header (bill_key, app_key, ",
        "bill_no, user_key, ",
        "order_key, rent_start_date, ",
        "rent_end_date, periods, ",
        "periods_days, periods_type, ",
        "`status`, interest_rate, ",
        "bill_amount, bill_interest, ",
        "bill_fine, repay_amount, ",
        "repay_interest, repay_fine_amount, ",
        "breaks_amount, surp_amount, ",
        "surp_interest_amount, surp_fine_amount, ",
        "unpay_date, unpay_amount, ",
        "unpay_interest_amount, unpay_periods, ",
        "unpay_fine_amount, fine_rate, ",
        "create_time, update_time, ",
        "remark, repay_change_amount)",
        "values (#{billKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{billNo,jdbcType=VARCHAR}, #{userKey,jdbcType=VARCHAR}, ",
        "#{orderKey,jdbcType=VARCHAR}, #{rentStartDate,jdbcType=DATE}, ",
        "#{rentEndDate,jdbcType=DATE}, #{periods,jdbcType=INTEGER}, ",
        "#{periodsDays,jdbcType=INTEGER}, #{periodsType,jdbcType=INTEGER}, ",
        "#{status,jdbcType=VARCHAR}, #{interestRate,jdbcType=DECIMAL}, ",
        "#{billAmount,jdbcType=INTEGER}, #{billInterest,jdbcType=INTEGER}, ",
        "#{billFine,jdbcType=INTEGER}, #{repayAmount,jdbcType=INTEGER}, ",
        "#{repayInterest,jdbcType=INTEGER}, #{repayFineAmount,jdbcType=INTEGER}, ",
        "#{breaksAmount,jdbcType=INTEGER}, #{surpAmount,jdbcType=INTEGER}, ",
        "#{surpInterestAmount,jdbcType=INTEGER}, #{surpFineAmount,jdbcType=INTEGER}, ",
        "#{unpayDate,jdbcType=DATE}, #{unpayAmount,jdbcType=INTEGER}, ",
        "#{unpayInterestAmount,jdbcType=INTEGER}, #{unpayPeriods,jdbcType=INTEGER}, ",
        "#{unpayFineAmount,jdbcType=INTEGER}, #{fineRate,jdbcType=DECIMAL}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
        "#{remark,jdbcType=VARCHAR}, #{repayChangeAmount,jdbcType=INTEGER})"
    })
    int insert(FintechRentBillHeader record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_rent_bill_header
     *
     * @mbg.generated
     */
    @InsertProvider(type=FintechRentBillHeaderSqlProvider.class, method="insertSelective")
    int insertSelective(FintechRentBillHeader record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_rent_bill_header
     *
     * @mbg.generated
     */
    @SelectProvider(type=FintechRentBillHeaderSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="bill_key", property="billKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="bill_no", property="billNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_key", property="orderKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="rent_start_date", property="rentStartDate", jdbcType=JdbcType.DATE),
        @Result(column="rent_end_date", property="rentEndDate", jdbcType=JdbcType.DATE),
        @Result(column="periods", property="periods", jdbcType=JdbcType.INTEGER),
        @Result(column="periods_days", property="periodsDays", jdbcType=JdbcType.INTEGER),
        @Result(column="periods_type", property="periodsType", jdbcType=JdbcType.INTEGER),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="interest_rate", property="interestRate", jdbcType=JdbcType.DECIMAL),
        @Result(column="bill_amount", property="billAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="bill_interest", property="billInterest", jdbcType=JdbcType.INTEGER),
        @Result(column="bill_fine", property="billFine", jdbcType=JdbcType.INTEGER),
        @Result(column="repay_amount", property="repayAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="repay_interest", property="repayInterest", jdbcType=JdbcType.INTEGER),
        @Result(column="repay_fine_amount", property="repayFineAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="breaks_amount", property="breaksAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="surp_amount", property="surpAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="surp_interest_amount", property="surpInterestAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="surp_fine_amount", property="surpFineAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="unpay_date", property="unpayDate", jdbcType=JdbcType.DATE),
        @Result(column="unpay_amount", property="unpayAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="unpay_interest_amount", property="unpayInterestAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="unpay_periods", property="unpayPeriods", jdbcType=JdbcType.INTEGER),
        @Result(column="unpay_fine_amount", property="unpayFineAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="fine_rate", property="fineRate", jdbcType=JdbcType.DECIMAL),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="repay_change_amount", property="repayChangeAmount", jdbcType=JdbcType.INTEGER)
    })
    List<FintechRentBillHeader> selectByExampleWithRowbounds(FintechRentBillHeaderExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_rent_bill_header
     *
     * @mbg.generated
     */
    @SelectProvider(type=FintechRentBillHeaderSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="bill_key", property="billKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="bill_no", property="billNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_key", property="orderKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="rent_start_date", property="rentStartDate", jdbcType=JdbcType.DATE),
        @Result(column="rent_end_date", property="rentEndDate", jdbcType=JdbcType.DATE),
        @Result(column="periods", property="periods", jdbcType=JdbcType.INTEGER),
        @Result(column="periods_days", property="periodsDays", jdbcType=JdbcType.INTEGER),
        @Result(column="periods_type", property="periodsType", jdbcType=JdbcType.INTEGER),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="interest_rate", property="interestRate", jdbcType=JdbcType.DECIMAL),
        @Result(column="bill_amount", property="billAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="bill_interest", property="billInterest", jdbcType=JdbcType.INTEGER),
        @Result(column="bill_fine", property="billFine", jdbcType=JdbcType.INTEGER),
        @Result(column="repay_amount", property="repayAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="repay_interest", property="repayInterest", jdbcType=JdbcType.INTEGER),
        @Result(column="repay_fine_amount", property="repayFineAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="breaks_amount", property="breaksAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="surp_amount", property="surpAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="surp_interest_amount", property="surpInterestAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="surp_fine_amount", property="surpFineAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="unpay_date", property="unpayDate", jdbcType=JdbcType.DATE),
        @Result(column="unpay_amount", property="unpayAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="unpay_interest_amount", property="unpayInterestAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="unpay_periods", property="unpayPeriods", jdbcType=JdbcType.INTEGER),
        @Result(column="unpay_fine_amount", property="unpayFineAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="fine_rate", property="fineRate", jdbcType=JdbcType.DECIMAL),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="repay_change_amount", property="repayChangeAmount", jdbcType=JdbcType.INTEGER)
    })
    List<FintechRentBillHeader> selectByExample(FintechRentBillHeaderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_rent_bill_header
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "bill_key, app_key, bill_no, user_key, order_key, rent_start_date, rent_end_date, ",
        "periods, periods_days, periods_type, `status`, interest_rate, bill_amount, bill_interest, ",
        "bill_fine, repay_amount, repay_interest, repay_fine_amount, breaks_amount, surp_amount, ",
        "surp_interest_amount, surp_fine_amount, unpay_date, unpay_amount, unpay_interest_amount, ",
        "unpay_periods, unpay_fine_amount, fine_rate, create_time, update_time, remark, ",
        "repay_change_amount",
        "from fintech_rent_bill_header",
        "where bill_key = #{billKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="bill_key", property="billKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="bill_no", property="billNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_key", property="orderKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="rent_start_date", property="rentStartDate", jdbcType=JdbcType.DATE),
        @Result(column="rent_end_date", property="rentEndDate", jdbcType=JdbcType.DATE),
        @Result(column="periods", property="periods", jdbcType=JdbcType.INTEGER),
        @Result(column="periods_days", property="periodsDays", jdbcType=JdbcType.INTEGER),
        @Result(column="periods_type", property="periodsType", jdbcType=JdbcType.INTEGER),
        @Result(column="status", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="interest_rate", property="interestRate", jdbcType=JdbcType.DECIMAL),
        @Result(column="bill_amount", property="billAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="bill_interest", property="billInterest", jdbcType=JdbcType.INTEGER),
        @Result(column="bill_fine", property="billFine", jdbcType=JdbcType.INTEGER),
        @Result(column="repay_amount", property="repayAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="repay_interest", property="repayInterest", jdbcType=JdbcType.INTEGER),
        @Result(column="repay_fine_amount", property="repayFineAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="breaks_amount", property="breaksAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="surp_amount", property="surpAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="surp_interest_amount", property="surpInterestAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="surp_fine_amount", property="surpFineAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="unpay_date", property="unpayDate", jdbcType=JdbcType.DATE),
        @Result(column="unpay_amount", property="unpayAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="unpay_interest_amount", property="unpayInterestAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="unpay_periods", property="unpayPeriods", jdbcType=JdbcType.INTEGER),
        @Result(column="unpay_fine_amount", property="unpayFineAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="fine_rate", property="fineRate", jdbcType=JdbcType.DECIMAL),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="repay_change_amount", property="repayChangeAmount", jdbcType=JdbcType.INTEGER)
    })
    FintechRentBillHeader selectByPrimaryKey(String billKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_rent_bill_header
     *
     * @mbg.generated
     */
    @UpdateProvider(type=FintechRentBillHeaderSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") FintechRentBillHeader record, @Param("example") FintechRentBillHeaderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_rent_bill_header
     *
     * @mbg.generated
     */
    @UpdateProvider(type=FintechRentBillHeaderSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") FintechRentBillHeader record, @Param("example") FintechRentBillHeaderExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_rent_bill_header
     *
     * @mbg.generated
     */
    @UpdateProvider(type=FintechRentBillHeaderSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(FintechRentBillHeader record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_rent_bill_header
     *
     * @mbg.generated
     */
    @Update({
        "update fintech_rent_bill_header",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "bill_no = #{billNo,jdbcType=VARCHAR},",
          "user_key = #{userKey,jdbcType=VARCHAR},",
          "order_key = #{orderKey,jdbcType=VARCHAR},",
          "rent_start_date = #{rentStartDate,jdbcType=DATE},",
          "rent_end_date = #{rentEndDate,jdbcType=DATE},",
          "periods = #{periods,jdbcType=INTEGER},",
          "periods_days = #{periodsDays,jdbcType=INTEGER},",
          "periods_type = #{periodsType,jdbcType=INTEGER},",
          "`status` = #{status,jdbcType=VARCHAR},",
          "interest_rate = #{interestRate,jdbcType=DECIMAL},",
          "bill_amount = #{billAmount,jdbcType=INTEGER},",
          "bill_interest = #{billInterest,jdbcType=INTEGER},",
          "bill_fine = #{billFine,jdbcType=INTEGER},",
          "repay_amount = #{repayAmount,jdbcType=INTEGER},",
          "repay_interest = #{repayInterest,jdbcType=INTEGER},",
          "repay_fine_amount = #{repayFineAmount,jdbcType=INTEGER},",
          "breaks_amount = #{breaksAmount,jdbcType=INTEGER},",
          "surp_amount = #{surpAmount,jdbcType=INTEGER},",
          "surp_interest_amount = #{surpInterestAmount,jdbcType=INTEGER},",
          "surp_fine_amount = #{surpFineAmount,jdbcType=INTEGER},",
          "unpay_date = #{unpayDate,jdbcType=DATE},",
          "unpay_amount = #{unpayAmount,jdbcType=INTEGER},",
          "unpay_interest_amount = #{unpayInterestAmount,jdbcType=INTEGER},",
          "unpay_periods = #{unpayPeriods,jdbcType=INTEGER},",
          "unpay_fine_amount = #{unpayFineAmount,jdbcType=INTEGER},",
          "fine_rate = #{fineRate,jdbcType=DECIMAL},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP},",
          "remark = #{remark,jdbcType=VARCHAR},",
          "repay_change_amount = #{repayChangeAmount,jdbcType=INTEGER}",
        "where bill_key = #{billKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(FintechRentBillHeader record);
}